package demo3;

import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int x = scanner.nextInt();
        int[] a = new int[n];
        for(int i = 0; i < n; i++) {
            a[i] = scanner.nextInt();
        }
        
        int[] arr = new int[n];
        for (int i = 0; i < n; i++) {
            arr[i] = -1;
        }

        for(int i = 0; i < n; i++) {
            int r = i;
            int sum = 0;
            while(r >= 0) {
                sum += a[r];
                if(sum >= x) {
                    arr[i] = r;
                    break;
                }
                r--;
            }
        }
        
        for(int i = 0; i < n; i++) {
            if(arr[i] != -1) {
                System.out.println((arr[i]+1) + " " + (i+1));
                break;
            }
        }
    }
}


